﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OMDR
{
    class UserController
    {
        private static UserController instance;

        private UserController()
        {
        }

        public static UserController getInstance
        {
            get
            {
                if (instance == null)
                {
                    instance = new UserController();
                }
                return instance;
            }
        }

        public List<String> getProjectList()
        {
            TransactionManager locTransactionManager = TransactionManager.getInstance;
            return locTransactionManager.getProjectListInDB();
        }
        
        public Project getProject(String parProjectName)
        {
            TransactionManager locTransactionManager = TransactionManager.getInstance;
            return locTransactionManager.getProjectInDB(parProjectName);
        }

        public void createObjective(String parName, String parDescription, String parType, int parPhase, String parProcess)
        {
            DataManager locDataManager = DataManager.getInstance;
            locDataManager.createObjectiveData(parName, parDescription, parType, parPhase, parProcess);
        }

        public void displayProjectTree(Project parProject)
        {
        }

        public void updateProjectTree(Project parProject)
        {
        }
    }
}
